home *** CD-ROM | disk | FTP | other *** search
/ Acorn RISC PD-CD 1 / Acorn RISC PD-CD 1.iso / utilities / _graphics / graphics / _jpeg / makefile < prev    next >
Encoding:
Makefile  |  1991-10-28  |  6.3 KB  |  158 lines

  1. # Makefile for Independent JPEG Group's software
  2.  
  3. # This makefile is suitable for Unix-like systems.
  4.  
  5. # See README and edit jconfig.h before saying "make" !!
  6.  
  7. # Comment out this line if you don't have gcc:
  8. #CC=gcc
  9. CC = cc
  10. # You may need to adjust these cc options:
  11. #CFLAGS= -O -g -Wall -DHAVE_GETOPT -DMEM_STATS
  12. CFLAGS= -c 
  13. # LDFLAGS= -g
  14. LDFLAGS=
  15. # In particular:
  16. #   Remove -g and -Wall if not using gcc.
  17. #   Add -DBSD if on a pure BSD system (see jinclude.h).
  18. #   Remove -DHAVE_GETOPT if you don't have getopt(3) (see jcmain.c, jdmain.c).
  19. #   -DMEM_STATS is optional -- it enables gathering of memory usage statistics.
  20. #   You may also want to add -DTWO_FILE_COMMANDLINE or -D switches for other
  21. #   symbols listed in jconfig.h, if you prefer not to change jconfig.h.
  22. # If your compiler is non-ANSI, also see the .c.o rule below.
  23.  
  24. # On HP-UX (and probably other SysV systems) the alternate malloc(3X) is a lot
  25. # faster than the standard malloc; this makes a noticeable difference in the
  26. # startup time when handling big noninterleaved images.  I say "-lmalloc" to
  27. # get the alternate allocator.  On most non-SysV systems you can just
  28. # define LDLIBS as empty.
  29. #LDLIBS= -lmalloc
  30. LDLIBS= :4.progdev.clib.o.stubs 
  31. # miscellaneous OS-dependent stuff
  32. LN= link       # linker
  33. RM= erase       # file deletion command
  34. AR= ar rc       # library (.a) file creation command
  35. AR2= ranlib     # second step in .a creation (use "touch" if not needed)
  36.  
  37. # Stuff for AMU
  38. .SUFFIXES: .o .c 
  39.  
  40. # source files
  41. INCLUDES= jinclude.h jconfig.h jpegdata.h 
  42. SOURCES= jbsmooth.c jcarith.c jccolor.c jcdeflts.c jcexpand.c \
  43.          jchuff.c jcmain.c jcmaster.c jcmcu.c jcpipe.c jcsample.c \
  44.          jdarith.c jdcolour.c jdhuff.c jdmain.c jdmaster.c jdmcu.c \
  45.          jdpipe.c jdsample.c jerror.c jfwddct.c jquant1.c jquant2.c \
  46.          jrdjfif.c jrdgif.c jrdppm.c jrevdct.c jutils.c jvirtmem.c \
  47.          jwrjfif.c jwrgif.c jwrppm.c egetopt.c
  48. DOCS= README architecture codingrules
  49. MAKEFILES= makefile.unix makefile.amiga \
  50.            makefile.mc5 makefile.mc6 makcjpeg.lnk makdjpeg.lnk \
  51.            makefile.pwc makcjpeg.cf makdjpeg.cf makljpeg.cf
  52. TESTFILES= testorig.jpg testimg.ppm testimg.jpg
  53. DISTFILES= $(DOCS) $(MAKEFILES) ansi2knr.c $(SOURCES) $(INCLUDES) $(TESTFILES)
  54.  
  55. # compression objectfiles
  56. COBJECTS = jcmain.o jcmaster.o jcdeflts.o jcarith.o jccolor.o jcexpand.o \
  57.            jchuff.o jcmcu.o jcpipe.o jcsample.o jfwddct.o \
  58.            jrdgif.o jrdppm.o jwrjfif.o \
  59.            jutils.o jvirtmem.o jerror.o
  60. # decompression objectfiles
  61. DOBJECTS = jdmain.o jdmaster.o jbsmooth.o jdarith.o jdcolour.o jdhuff.o \
  62.            jdmcu.o jdpipe.o jdsample.o jquant1.o jquant2.o jrevdct.o \
  63.            jrdjfif.o jwrgif.o jwrppm.o \
  64.            jutils.o jvirtmem.o jerror.o
  65. # These objectfiles are included in libjpeg.a (all but jcmain.o, jdmain.o)
  66. LIBOBJECTS = jcmaster.o jcdeflts.o jcarith.o jccolor.o jcexpand.o \
  67.              jchuff.o jcmcu.o jcpipe.o jcsample.o jfwddct.o \
  68.              jrdgif.o jrdppm.o jwrjfif.o \
  69.              jdmaster.o jbsmooth.o jdarith.o jdcolor.o jdhuff.o \
  70.              jdmcu.o jdpipe.o jdsample.o jquant1.o jquant2.o jrevdct.o \
  71.              jrdjfif.o jwrgif.o jwrppm.o \
  72.              jutils.o jvirtmem.o jerror.o
  73.  
  74.  
  75. all: cjpeg djpeg
  76. # By default, libjpeg.a is not built unless you explicitly request it.
  77.  
  78.  
  79. # If you have a C compiler that doesn't understand function prototypes,
  80. # uncomment the 5 lines below and make sure PROTO is not defined by jconfig.h.
  81. # Then say "make ansi2knr" before "make".
  82.  
  83. #.c.o:
  84. #       ./ansi2knr $*.c tmpansi.c
  85. #       $(CC) $(CFLAGS) -c tmpansi.c
  86. #       mv tmpansi.o $*.o
  87. #       $(RM) tmpansi.c
  88.  
  89. ansi2knr: ansi2knr.c
  90.         $(CC) -o ansi2knr ansi2knr.c
  91. # You may need to add one of -DBSD, -DVMS, or -DMSDOS to the line above.
  92.  
  93.  
  94. cjpeg: $(COBJECTS)
  95.         $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) $(LDLIBS)
  96.  
  97. djpeg: $(DOBJECTS)
  98.         $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) $(LDLIBS)
  99.  
  100. # libjpeg.a is useful if you are including the JPEG software in a larger
  101. # program; you'd include it in your link, rather than the individual modules.
  102. libjpeg.a: $(LIBOBJECTS)
  103.         $(RM) libjpeg.a
  104.         $(AR) libjpeg.a  $(LIBOBJECTS)
  105.         $(AR2) libjpeg.a
  106.  
  107. clean:
  108.         $(RM) *.o cjpeg djpeg libjpeg.a ansi2knr core tmpansi.* testout.ppm testout.jpg
  109.  
  110. distribute:
  111.         $(RM) jpegsrc.tar*
  112.         tar cvf jpegsrc.tar $(DISTFILES)
  113.         ls -l jpegsrc.tar
  114.         compress -v jpegsrc.tar
  115.         ls -l jpegsrc.tar*
  116.  
  117. test: cjpeg djpeg
  118.         $(RM) testout.ppm testout.jpg
  119.         ./djpeg testorig.jpg >testout.ppm
  120.         ./cjpeg testimg.ppm >testout.jpg
  121.         cmp testimg.ppm testout.ppm
  122.         cmp testimg.jpg testout.jpg
  123.  
  124.  
  125. jbsmooth.o : jbsmooth.c jinclude.h jconfig.h jpegdata.h 
  126. jcarith.o : jcarith.c jinclude.h jconfig.h jpegdata.h 
  127. jccolor.o : jccolor.c jinclude.h jconfig.h jpegdata.h 
  128. jcdeflts.o : jcdeflts.c jinclude.h jconfig.h jpegdata.h 
  129. jcexpand.o : jcexpand.c jinclude.h jconfig.h jpegdata.h 
  130. jchuff.o : jchuff.c jinclude.h jconfig.h jpegdata.h 
  131. jcmain.o : jcmain.c jinclude.h jconfig.h jpegdata.h egetopt.c 
  132. jcmaster.o : jcmaster.c jinclude.h jconfig.h jpegdata.h 
  133. jcmcu.o : jcmcu.c jinclude.h jconfig.h jpegdata.h 
  134. jcpipe.o : jcpipe.c jinclude.h jconfig.h jpegdata.h 
  135. jcsample.o : jcsample.c jinclude.h jconfig.h jpegdata.h 
  136. jdarith.o : jdarith.c jinclude.h jconfig.h jpegdata.h 
  137. jdcolor.o : jdcolor.c jinclude.h jconfig.h jpegdata.h 
  138. jdhuff.o : jdhuff.c jinclude.h jconfig.h jpegdata.h 
  139. jdmain.o : jdmain.c jinclude.h jconfig.h jpegdata.h egetopt.c
  140. jdmaster.o : jdmaster.c jinclude.h jconfig.h jpegdata.h 
  141. jdmcu.o : jdmcu.c jinclude.h jconfig.h jpegdata.h 
  142. jdpipe.o : jdpipe.c jinclude.h jconfig.h jpegdata.h 
  143. jdsample.o : jdsample.c jinclude.h jconfig.h jpegdata.h 
  144. jerror.o : jerror.c jinclude.h jconfig.h jpegdata.h           
  145. jfwddct.o : jfwddct.c jinclude.h jconfig.h jpegdata.h 
  146. jquant1.o : jquant1.c jinclude.h jconfig.h jpegdata.h 
  147. jquant2.o : jquant2.c jinclude.h jconfig.h jpegdata.h 
  148. jrdjfif.o : jrdjfif.c jinclude.h jconfig.h jpegdata.h 
  149. jrdgif.o : jrdgif.c jinclude.h jconfig.h jpegdata.h 
  150. jrdppm.o : jrdppm.c jinclude.h jconfig.h jpegdata.h 
  151. jrevdct.o : jrevdct.c jinclude.h jconfig.h jpegdata.h 
  152. jutils.o : jutils.c jinclude.h jconfig.h jpegdata.h 
  153. jvirtmem.o : jvirtmem.c jinclude.h jconfig.h jpegdata.h 
  154. jwrjfif.o : jwrjfif.c jinclude.h jconfig.h jpegdata.h 
  155. jwrgif.o : jwrgif.c jinclude.h jconfig.h jpegdata.h 
  156. jwrppm.o : jwrppm.c jinclude.h jconfig.h jpegdata.h 
  157.  
  158. .c.o:;  $(CC) $(CFLAGS) -o $@ c.$*